<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<title>运营平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="renderer" content="webkit">
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">-->
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/common.css?v=20170207" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/table.css?v=20170117" />
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/css/jquery-ui.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-1.11.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ui.min.js" type="text/javascript"></script>
 <script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/yunIndex.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery-ym-datePlugin-0.1.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/js/global.js" type="text/javascript"></script>
<script src="<?php echo get_style_cdnurl();?>paimai/cheshan/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo get_style_cdnurl();?>paimai/yunying/js/jquery.placeholder.min.js"></script>
<script type="text/javascript">
 $(function(){
     $("input").placeholder();
     if (navigator.userAgent.indexOf("Safari") > -1) {
       $("input").css("lineHeight","normal !important");
     };
});
</script>

</head>
<body>
<div class="header">
<div class="headerCo">
<span>你好,<?php echo ($user_info["real_name"]); ?><a href="<?php echo (WEB_URL); ?>Emp/logout">退出</a></span>
<h1><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_logo.jpg"></h1>
</div>
</div>
<link type="text/css" rel="stylesheet" href="<?php echo get_style_cdnurl();?>paimai/yunying/plugin/select2/select2.css" />
<script src="<?php echo get_style_cdnurl();?>paimai/yunying/plugin/select2/select2.js" type="text/javascript"></script>
<style type="text/css">
    .carowner_1,.carowner_2{display: block;margin-top: 10px;width:100%;height:25px;}
    .carowner_2{margin-left:0px;}
    .select_model{
        -moz-appearance: none;background: rgba(0, 0, 0, 0) url("http://img3.isou365.cn/paimai/yunying/images/sanjiao.jpg") no-repeat scroll 115px 5px;
        border: 1px solid #d7d7d7;
        float: left;height: 26px;line-height: 26px;margin-right: 8px;text-indent: 2px;width: 136px;}
    .select2-container .select2-choice {
        background: rgba(0, 0, 0, 0) url("http://img1.isou365.cn/paimai/yunying/images/sanjiao.jpg") no-repeat scroll 140px 5px;
        border: 1px solid #d7d7d7;
        color: #444;
        display: block;
        height: 24px;
        line-height: 24px;
        overflow: hidden;
        padding: 0 0 0 8px;
        position: relative;
        text-decoration: none;
        white-space: nowrap;
        width: 154px;
    }
    .text_model{
        border: 1px solid #d7d7d7;float: left;height: 24px;
        line-height: 24px;margin: 0 10px 10px 0;text-align: center;width: 150px;
    }
    .search_btn{height:26px;line-height:26px;
                background: #20ab4f none repeat scroll 0 0;border-radius: 3px;border:medium none;color: #fff;
                margin-left: 7px;padding: 0;width: 60px;float:left;}
    .check_time{float:left;}
    .chenggong1 .paidan{padding-top:30px;}
    .chenggong1 .paidan h6{color:#666;}
    .chenggong1 .paidan h5{color:red;}
    .chenggong1{width: 750px;}
    .chenggong1 .shenhei-btn{margin: 50px 130px 0px; }
    .chenggong1 .msg{height: 130px;}
</style>
<div class="mian">
<div class="mianL">
    <dl>
        <dd>
            <a id="menu_sy" href="/Index/index" class="shouye">首页</a>
        </dd>
        <?php foreach ($tree_menu as $key => $value): ?>
          <dd>
            <span id="menu_<?php echo ($value['first_char']); ?>" ><img src="<?php echo get_style_cdnurl();?>paimai/yunying/images/yun_jia.jpg"><?php echo ($value['name']); ?></span>
            <ul style="display: none;">
                <?php if (!empty($value['children'])): ?>
                    <?php foreach ($value['children'] as $k => $v): ?>
                        <li><a id='menu_<?php echo ($v["first_char"]); ?>' href="<?php echo ($v['url']); ?>"><?php echo ($v['name']); ?></a></li>
                    <?php endforeach ?>
                <?php endif ?>
            </ul>
        <?php endforeach ?>
    </dl>
</div>

<?php $menu = 'shgl.csyc'; ?>
<?php $menu=json_encode(explode('.', $menu)); ?>
<script>
    $(function () {
        var cur_menu = '<?php echo ($menu); ?>', cur_menu = eval('[' + cur_menu + ']'), cur_menu = cur_menu[0];
        if (cur_menu == "sy") {
            $("#menu_sy").removeClass('shouye').addClass('current');
        }
        $('#menu_' + cur_menu[0]).click();
        $('#menu_' + cur_menu[0]).find("img").attr("src", "http://img1.isou365.cn/paimai/yunying/images/yun_jie.jpg");
        $(".mianL").css("height", $(document).height() - 95);
        $('#menu_' + cur_menu[1]).addClass('current');
    });
</script>
    <div class="mianR">
        <div class="yuyue">
            <ul>
                <li onclick="get_list(0);" class="yuCurrent">待验车</li>                  
                <li onclick="get_list(1);">跟踪中</li>
                <li onclick="get_list(2);">验车成功</li>
                <li onclick="get_list(3);">验车失败</li>
                <li onclick="get_list(5);">已锁定</li>
            </ul>
        </div>        
       <div class="yunBei" style="display:none"></div>
        <div class="yuList">
            <div class="yuSuo clearfix" style="float:left;">
                <form id="searchFrom">
                    <input id="status" name="status" type="hidden" value="<?php echo ($params["search"]["status"]); ?>"/>

                    <select name="location_area" id="location_area" class="select_model">
                        <?php if(count($bc_city) > 1): ?><option value="">请选择所在地</option><?php endif; ?>
                        <?php if(is_array($bc_city)): $i = 0; $__LIST__ = $bc_city;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$city): $mod = ($i % 2 );++$i;?><option value="<?php echo ($key); ?>"><?php echo ($city); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
                    <input type="text" id="order_no" name="order_no" value="<?php echo ($params["search"]["order_no"]); ?>"  placeholder="车商联系人/联系人电话/拍卖单号"  class="suoDian suoDian1">
                    <input type="button" onclick="searchs();" id="search" value="搜索" class="suoSou">
                </form>
            </div>
        </div>
        <div class="listBox" id="listBox">
            <?php echo ($content); ?>
        </div>
        <div class="clear"></div>
    </div>
</div>
    </body>
</html>
<script type="text/javascript">

    function confirm_note(c_id) {
        var msg = "您确定已通知车商验车了吗?";
        // msg = "【来拍车】尊敬的客户，恭喜您拍单P20151108004确认成交，请于2015年xx月xx日11点45分前到北京草桥店验车。咨询电话400-6688-365";
        // htext = "是否发送短信提醒车商？";
        // text = '<span class="msg">' + msg + '</span>';
        // <span class="paidan"><h5>' + htext + '</h5>'  + '</span>\n\
        var html = '<div class="chenggong1">\n\
                    <span class="paidan"><h6>' + msg + '</h6>'  + '</span>\n\
                    <div class="shenhei-btn"><input type="button" value="确定" class="determine" />\n\
                    <input type="button" value="取消" class="cancel" onclick="colse_hide()" />\n\
                    </div></div>';
        $(".yunBei").css("display", "block");
        $(document.body).append(html);
        $(".chenggong1").fadeIn();
        confirm_note_do(c_id);
    }

    function confirm_note_do(c_id) {
        $('.determine').click(function () {
            colse_hide();
            var post_data = {c_id:c_id};
            $.post('/DealerCheckCar/checkNote', post_data, function (res) {
                if (res.code == 200) {
                    delay_alert('操作成功!');
                    setTimeout(function () {
                        window.location.reload();
                    }, 500);
                } else {
                    delay_alert(res.msg);
                }
            }, 'json');
            return false;
        });
    }

    function confirm_msg(o_id, c_num, check_limit_time, check_addr) {
        var msg = "【来拍车】尊敬的客户，恭喜您拍单"+c_num+"确认成交，请于"+check_limit_time+"前到"+check_addr+"验车。咨询电话400-6688-365";
        htext = "是否发送短信提醒车商？";
        // text = '<span class="msg">' + msg + '</span>';
        var html = '<div class="chenggong1">\n\
                    <span class="paidan"><h6>' + msg + '</h6>'  + '</span>\n\
                    <span class="paidan"><h5>' + htext + '</h5>'  + '</span>\n\
                    <div class="shenhei-btn"><input type="button" value="确定" class="determine" />\n\
                    <input type="button" value="取消" class="cancel" onclick="colse_hide()" />\n\
                    </div></div>';
        $(".yunBei").css("display", "block");
        $(document.body).append(html);
        $(".chenggong1").fadeIn();
        confirm_msg_do(o_id);
    }

    function confirm_msg_do(o_id) {
        $('.determine').click(function () {
            colse_hide();
            var post_data = {o_id: o_id};
            $.post('/DealerCheckCar/checkMsgSend', post_data, function (res) {
                if (res.code == 200) {
                    delay_alert('操作成功!');
                    setTimeout(function () {
                        window.location.reload();
                    }, 500);
                } else {
                    delay_alert(res.msg);
                }
            }, 'json');
            return false;
        });
    }

    // function confirm_vialate(c_id) {
    //     var htext = "您确定将此车商置为争议吗?";
    //     // text = '<span class="msg">' + msg + '</span>';
    //     var html = '<div class="chenggong1" style="height: 260px;">\n\
    //                 <span class="paidan"><h6>' + htext + '</h6>'  + '</span>\n\
    //                 <textarea id="violate_remark" name="violate_remark" style="height:100px;width:430px;margin-top:20px;"></textarea><em style="color:red;">&nbsp;*</em>\n\
    //                 <div class="shenhei-btn" style="margin-top:20px;"><input type="button" value="确定" class="determine" />\n\
    //                 <input type="button" value="取消" class="cancel" onclick="colse_hide()" />\n\
    //                 </div></div>';
    //     $(".yunBei").css("display", "block");
    //     $(document.body).append(html);
    //     $(".chenggong1").fadeIn();
    //     confirm_vialate_do(c_id);
    // }

    // function confirm_vialate_do(c_id) {
    //     $('.determine').click(function () {
            
    //         var violate_remark = $("#violate_remark").val();
    //         var post_data = {c_id: c_id, violate_remark: violate_remark};
    //         $.post('/DealerCheckCar/checkViolate', post_data, function (res) {
    //             if (res.code == 200) {
    //                 colse_hide();
    //                 delay_alert('操作成功!');
    //                 setTimeout(function () {
    //                     window.location.reload();
    //                 }, 500);
    //             } else {
    //                 delay_alert(res.msg);
    //             }
    //         }, 'json');
    //         return false;
    //     });
    // }

    function get_page(p){
        var data = $("#searchFrom").serialize() + "&" +encodeURI("p="+p);
        $.get("/DealerCheckCar/getList", data, function(data){
            $("#listBox").html(data);  
        },"html");
    }

    function searchs(){
        var status = $("#status").val();
        get_list(status);
        // clear_params();
    }

    function get_list(status){
        $("#status").val(status);        
        var url = get_url();
        $.get("/DealerCheckCar/getList?status=" + status ,url,function(data){
            $("#listBox").html(data);
        },"html");
    }

    function get_url(){
        var url = "";
        var location_area = $("#location_area").val();
        var order_no = $("#order_no").val();
        if (location_area) {
            url += '&location_area=' + location_area;
        }
        if (order_no) {
            url += '&order_no=' + order_no;
        }
        return url;
    }

    function change_search(st){
            clear_params();
    }
    function clear_params(){
        $("#from").val(0);
        $("#comeFrom").val('-2');
        $("#location_area").val(0);
        $("#order_no").val('');
    }

</script>